//
//  ILView.m
//  DoubanDemo1
//
//  Created by lanou3g on 15/11/20.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "ILView.h"

@implementation ILView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self allViews];
    }
    return self;
}

- (void)allViews
{
    CGFloat selfWidth = self.frame.size.width;
    CGFloat selfHeight = self.frame.size.height;
    CGFloat imageWidth = selfHeight;
    CGFloat imageHeight = selfHeight;
    CGFloat labelWidth = selfWidth-imageWidth;
    CGFloat labelHeight = selfHeight;
    
    self.leftImageView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"icon_date@2x"]];
    //self.leftImageView.backgroundColor = [UIColor yellowColor];
    self.leftImageView.frame = CGRectMake(0, 0, selfHeight, imageHeight);
    [self addSubview:self.leftImageView];
    
    self.rightLabel = [[UILabel alloc]initWithFrame:CGRectMake(imageWidth, 0, labelWidth, labelHeight)];
    //self.rightLabel.backgroundColor = [UIColor orangeColor];
    
    [self addSubview:self.rightLabel];
}


@end
